package me.learningandroid.ch2_7.uicomponentdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.google.android.material.floatingactionbutton.FloatingActionButton;

public class Splash3Activity extends AppCompatActivity {


    public static void startActivity(Context context) {
        Intent intent = new Intent(context, Splash3Activity.class);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash3);

        Button btnInvisible = findViewById(R.id.btnInvisible);
        btnInvisible.setOnClickListener(v -> {
            btnInvisible.setVisibility(View.INVISIBLE);
        });

        Button btnGone = findViewById(R.id.btnGone);
        btnGone.setOnClickListener(v -> {
            btnGone.setVisibility(View.GONE);
        });

        Button nextBtn = findViewById(R.id.nextBtn);
        nextBtn.setOnClickListener((view)-> {
            Splash4Activity.startActivity(this);
        });
    }
}